package com.whq.mvc.base.designpattern.state;

public class InitState implements ConnectState{

    private ConnectMachine machine;

    public InitState(ConnectMachine machine) {
        this.machine = machine;
    }

    @Override
    public void handleRequest() {
        doConnect();
        machine.waitingConnect();
    }

    private void doConnect() {
        System.out.println("初始化连接");
    }
}
